package com.welse.modulebiz.domain.entity;

import java.util.Date;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * @TableName member
 */
@Data
public class Member {
    @NotNull
    private Integer mid;

    //改值只能为0或1，0为个人，1为公司
    @NotNull(message = "mtype不能为空")
    @Pattern(regexp = "^[01]$", message = "mtype只能为0或1")
    private Integer mtype = 0;

    @Pattern(regexp = "^[a-zA-Z0-9_-]{4,16}$", message = "用户名格式不正确")
    private String userid;

    @NotNull(message = "pwd不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9_-]{4,16}$", message = "密码格式不正确")
    private String pwd;

    @Pattern(regexp = "^[a-zA-Z0-9_-]{4,16}$", message = "昵称格式不正确")
    private String uname;

    //该值只能为男或女或者保密
    @Pattern(regexp = "^(男|女|保密)$", message = "性别只能为男或女或者保密")
    private Object sex = "保密";

    private Date uptime;

    private Date exptime = new Date();

    @Email
    private String email;

    //设置值只能为0或1，0为正常，1为禁用，默认值为0
    @Pattern(regexp = "^[01]$", message = "matt只能为0或1")


    private Integer matt = 0;

    private String face = "https://cdn-official-web.peropero.net/character_icon/pc/buro/divinegear_0.pngw";

    private Date jointime;

    private String joinip;

    private Date logintime;

    private String loginip;
}